#ifndef _LED_H_
#define _LED_H_
#include "stm32l052xx.h"
#include "stm32l0xx_hal.h"

typedef enum 
{
  LED2 = 0,
  LED_GREEN = LED2
} Led_TypeDef;

#define LEDn                               1

#define LED2_PIN                           GPIO_PIN_2
#define LED2_GPIO_PORT                     GPIOB
#define LED2_GPIO_CLK_ENABLE()           __HAL_RCC_GPIOB_CLK_ENABLE()  
#define LED2_GPIO_CLK_DISABLE()          __HAL_RCC_GPIOB_CLK_DISABLE()
  
#define LEDx_GPIO_CLK_ENABLE(__INDEX__)    do {LED2_GPIO_CLK_ENABLE(); } while(0)
#define LEDx_GPIO_CLK_DISABLE(__INDEX__)   LED2_GPIO_CLK_DISABLE())


void BSP_LED_Init(Led_TypeDef Led);
void led_on(Led_TypeDef Led);
void led_off(Led_TypeDef Led);
void led_toggle(Led_TypeDef Led);
#endif //_LED_H_
